import java.util.ArrayList;
import java.util.List;

public class Solution535 {

    int count=0;
    List<String> list=new ArrayList<>();

    public String encode(String longUrl) {
        list.add(longUrl);
        count++;
        return String.valueOf(count-1);
    }

    public String decode(String shortUrl) {
        int t=Integer.parseInt(shortUrl);
        return list.get(t);
    }

    public static void main(String[] args) {
        Solution535 solution535=new Solution535();
        System.out.println(solution535.decode(solution535.encode("666")));
    }
}
